package com.merge.sample.model;

import com.merge.sample.util.MyUtil;


public class MResult extends MData {
	public boolean isFile;

	public MResult(MData data) {
		super(data.getProject(), data.getRelativePath());
		this.isMergeable = true;
		this.inclusives = data.inclusives;
		this.isFile = data instanceof MFile;
	}
	
	public String getFullPath() {
		return MyUtil.formatFilename(getProject().source, this.source);
	}
	
	public String replaceBaseDir(String otherDir) {
		return MyUtil.formatFilename(otherDir, this.source);
	}

	public String toString() {

		return String
				.format("basePath: %s, relativePath: %s, inclusives: %s ",
						this.parent, this.source, this.inclusives );
	}
}
